package com.anxinm.factory.platform.impl;

import com.anxinm.constant.FaDaDaConstant;
import com.anxinm.factory.platform.ContractPlatFormHandle;
import com.anxinm.factory.template.impl.FaDaDaPlatformInterfaceTemplateImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import java.util.HashMap;

/**
 * 法大大平台 合同处理类
 * 定义为  多例模式
 * 防止高并发状态下，模板错乱问题
 * 合同场景
 */
@Component(FaDaDaConstant.FADADA_ENV)
@Scope("prototype")
public class FaDaDaPlatFormHandle extends ContractPlatFormHandle {

    /**路径资源 map 只初始化一次，不需要考虑并发问题*/
    public static final HashMap<String ,String> CONTRACT_API_URL_MAP = new HashMap<>(16) ;

    /**初始化资源*/
    static {
        CONTRACT_API_URL_MAP.put(FaDaDaConstant.GET_TOKEN,FaDaDaConstant.GET_TOKEN) ;
        CONTRACT_API_URL_MAP.put(FaDaDaConstant.GET_TOKEN,FaDaDaConstant.GET_TOKEN) ;
        CONTRACT_API_URL_MAP.put(FaDaDaConstant.GET_TOKEN,FaDaDaConstant.GET_TOKEN) ;
        CONTRACT_API_URL_MAP.put(FaDaDaConstant.GET_TOKEN,FaDaDaConstant.GET_TOKEN) ;
        CONTRACT_API_URL_MAP.put(FaDaDaConstant.GET_TOKEN,FaDaDaConstant.GET_TOKEN) ;
    }

    @Autowired
    public FaDaDaPlatformInterfaceTemplateImpl platformInterfaceTemplate ;

    /**对接合同场景  外包  租赁 */

    private void test(){
        config.getUrl();
    }

}
